package com.yty.demo._4_oop;

import java.util.Arrays;

/**
 * @author: yangtaoyao
 * @time: 2020/1/7 13:34
 * @description:
 */
public class Teacher{
    private String name;
    private  String major;
    private int tAge;
    private String[] tCourse;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public int gettAge() {
        return tAge;
    }

    public void settAge(int tAge) {
        this.tAge = tAge;
    }

    public String[] gettCourse() {
        return tCourse;
    }

    public void settCourse(String[] tCourse) {
        this.tCourse = tCourse;
    }

    public String showInfo() {
        return "教师信息{" +"\n" +
                "name='" + name + "\'\n" +
                "major='" + major +"\n" +
                "tAge=" + tAge +"\n" +
                "tCourse=" + Arrays.toString(tCourse) +"\n" +
                '}';
    }

    public static void main(String[] args) {
        Teacher t =new Teacher();
        t.settAge(10);
        t.setName("李老师");
        String[] courses={"C语言","java"};
        t.settCourse(courses);
        t.setMajor("软件工程");
        System.out.println(t.showInfo());
        System.out.println(new Teacher().showInfo());
    }
}
